<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>文章管理</title>
<link rel="stylesheet" type="text/css" href="${request.contextPath}/resources/js/jquery-treetable/jquery.treetable.css" />
<link rel="stylesheet" type="text/css" href="${request.contextPath}/resources/js/jquery-treetable/jquery.treetable.theme.default.css" />
<link href="${request.contextPath}/resources/js/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<link href="${request.contextPath}/resources/js/datetimepicker/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet">


<script type="text/javascript" src="${request.contextPath}/resources/js/jquery-treetable/jquery.treetable.js"></script>
<script type="text/javascript" src="${request.contextPath}/resources/js/datetimepicker/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="${request.contextPath}/resources/js/datetimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
<script>

	
	var searchData =function()
	{
		$.ajax({
			url:'${request.contextPath}/article/queryAllArticle.htm',
			type:'post',
			dataType:'html',
			async:'false',
			cache:false,
			processData:true,
			data:$("#articleQueryForm").serialize()+'&isMap=1',
			success:function(html)
			{
				$('#dataDiv').html(html);
			}
		});
	}
	
	//添加前展示
	var preAddArticle = function()
	{
		
		$.ajax({
			url:'${request.contextPath}/article/preAddArticle.htm',
			type:'post',
			async:'false',
			cache:false,
			processData:true,
			success:function(html)
			{
				$('#art').html(html);
				$('#articleModal').modal();
			}
		});
	}
	
	window.UMEDITOR_HOME_URL="/blog/resources/js/umeditor/"; 
	searchData();
</script>
</head>
<body>
<span class="cp_title">文章管理</span>
<br/>
<br/>

<form class="form-horizontal" id="articleQueryForm" style="margin-right:20px;" role="form">
   <div class="form-group">
      <label class="col-sm-1 control-label">博客标题</label>
      <div class="col-sm-2">
		 <input class="form-control" type="text" value="" name="title" placeholder="请输入博客标题"/>
      </div>
      <label class="col-sm-1 control-label">博客类型</label>
	  <div class="col-sm-2">
	     <select id="disabledSelect" name="articleType" class="form-control">
	           <option value="1">程序人生</option>
	           <option value="2">思维天地</option>
	     </select>
	  </div>
	  <label class="col-sm-1 control-label">创建日期</label>
	  <div class="col-sm-2">
		 <input type="text" readonly value="" name="startDate" class="form-control form_datetime" placeholder="请输入日期"/>
	  </div>
	  <label class="col-sm-1 control-label">至</label>
	  <div class="col-sm-2">
   	 	 <input type="text" readonly value="" name="endDate" class="form-control form_datetime" placeholder="请输入日期"/>
	  </div>
   </div>
   <div class="form-group">
	  <label for="inputPassword" class="col-sm-1 control-label">
	     	状态
	  </label>
	  <div class="col-sm-2">
	  		<select id="disabledSelect" name="visible" class="form-control">
	           <option value="1">可见</option>
	           <option value="0">不可见</option>
			</select>
	   </div>
	   <div class="col-sm-9 row" style="text-align:center">
	    	<button type="button" class="btn btn-primary" onclick="searchData();" data-toggle="modal">查询</button>
	    	&nbsp;&nbsp;&nbsp;&nbsp;
	   		<button type="button" class="btn btn-primary" onclick="preAddArticle();" data-toggle="modal">新增博客</button>
	   </div>
	   <input type="hidden" id="pageNum" name="pageNum" value="1"/>
	   <input type="hidden" id="pageSize" name="pageSize" value="10"/>
   </div>
   <script type="text/javascript">  $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd',minView: 'month',autoclose:true});</script>
</form>

<div id="dataDiv">
</div>

<center>

</center>


<div class="modal fade" id="articleModal" tabindex="-1" role="dialog" data-backdrop="static"
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog modal-lg" id="art">
 
   </div>
</div>

</body>
</html>
